cmake_minimum_required(VERSION 3.10)
project(LinuxGUIExamples)

set(OpenGL_GL_PREFERENCE "GLVND")

# WxWidgets-DEV
set(wxWidgets_USE_LIBS)
find_package(wxWidgets COMPONENTS core base REQUIRED)
include(${wxWidgets_USE_FILE})

# GTK-DEV
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER})

# FLTK-DEV
FIND_PACKAGE(FLTK REQUIRED)

# QT-DEV
find_package(Qt5 COMPONENTS Widgets REQUIRED)

# OPENGL
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)

add_executable(wxw wxw.cpp)
target_link_libraries(wxw ${wxWidgets_LIBRARIES})

add_executable(gtk-plus gtk-plus.c)
target_link_libraries(gtk-plus ${GTK3_LIBRARIES})

add_executable(fltk.bin fltk.cpp)
target_link_libraries(fltk.bin ${FLTK_LIBRARIES})

add_executable(opengl opengl.cpp)
target_link_libraries(opengl ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})

add_executable(qt qt.cpp)
target_link_libraries(qt Qt5::Widgets)
